package cn._2dland.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Logger {
	private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	public static void info(Object info) {
		StringBuffer buf = new StringBuffer();
		buf.append("[").append(sdf.format(new Date())).append("] ").append(info);
		System.out.println(buf);
	}

	public static void debug(Object info) {
		StringBuffer buf = new StringBuffer();
		buf.append("[").append(sdf.format(new Date())).append("][DEBUG] ").append(info);
		System.out.println(buf);
	}

	public static void error(Object info) {
		StringBuffer buf = new StringBuffer();
		buf.append("[").append(sdf.format(new Date())).append("][ERROR] ").append(info);
		System.err.println(buf);
	}
}
